<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>v-else-if</title>
    <script src="https://cdn.staticfile.org/vue/2.2.2/vue.min.js"></script>
</head>
<body>
<div id="case4-demo3">
    <div v-if="type==='A'" v-on:click="clickChange1('A')">
        A
    </div>
    <div v-if="type==='B'" v-on:click="clickChange1('B')">
        B
    </div>
    <div v-if="type==='C'" v-on:click="clickChange1('C')">
        C
    </div>
</div>
<script type="text/javascript">
    var case4Demo=new Vue({
        el:"#case4-demo3",
        data:{
         type:'A'
        },
        methods:{
            clickChange1:function (i) {
                if (i=='A'){
                    this.type='B'
                }else if (i=='B'){
                    this.type='C'
                }else if (i=='C'){
                    this.type='A'
                }
            }
        }

    })
</script>
</body>
</html>